<%@tag pageEncoding="UTF-8" language="java" %>
<%@attribute name="title" required="true" type="java.lang.String" %>
<%@attribute name="persons" required="true" type="java.util.Collection" %>
<%@attribute name="footer" required="false" fragment="true" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>${title}</title>
    </head>
    <body>
        <h2>This layout text</h2>
        
        <div>
            <table>
                <c:forEach items="${persons}" var="person">
                    <tr>
                        <td>
                            <b>${person.name} ${person.surename}</b>
                        </td>
                    </tr>
                </c:forEach>
            </table>
        </div>
        
        <hr style="width:90%"/>
        <jsp:invoke fragment="footer"/>
    </body>
</html>
